package com.tuanzi.loan.web.lazy.statistics;

import com.tuanzi.loan.business.service.statistics.NoviceStatService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.statistics.novice.NoviceStatRequest;
import com.tuanzi.loan.vo.response.statistics.novice.NoviceTotalStatResponse;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2018-06-30 15:55
 */
public class NoviceTotalStatLazyDataModel extends BaseLazyDataModel<NoviceStatRequest, NoviceTotalStatResponse> {
    private NoviceStatService noviceStatService = SpringContextHolder.getBean(NoviceStatService.class);
    public NoviceTotalStatLazyDataModel(NoviceStatRequest noviceStatRequest) {
        super(noviceStatRequest);
    }

    @Override
    protected Page<NoviceTotalStatResponse> doLoad(PageSearcher<NoviceStatRequest> pageSearcher) {
        return noviceStatService.totalList(pageSearcher);
    }
}
